#ifndef __ADU_BRICK_H__
#define __ADU_BRICK_H__

#include "cocos2d.h"
#include "ADUConstant.h"
#include "ADUGameManager.h"
USING_NS_CC;

class BrickSprite : public Sprite 
{
	private:
		
		int 	_type;
		float 	_speed;
		ActionInterval* _action;
		float 	_totalHeight;
		Vec2	_posStart;
	public:
		static BrickSprite* create(const std::string& filename);
		static BrickSprite* create(int type);
		static BrickSprite* createWithTexture(Texture2D *texture, const Rect& rect, bool rotated);
		void update(float dt);
		void setType(int type) { _type = type;}
		void setSpeed(float speed){ _speed = speed;}
		int  getType() { return _type;}
		float getSpeed() { return _speed;}
		void setAction(int type);
		void setTotalHeight(float height) { _totalHeight = height;};
		ActionInterval* getAction() {return _action;};
		void setPosStart(const Vec2& pos) { _posStart = pos;};
		void resetPosition() {
			this->setPosition(_posStart);
		};
};

#endif
